<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Create a RecursiveCallbackFilterIterator from a RecursiveIterator</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="class.recursivecallbackfilteriterator.html">RecursiveCallbackFilterIterator</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="recursivecallbackfilteriterator.getchildren.html">RecursiveCallbackFilterIterator::getChildren</a></div>
 <div class="up"><a href="class.recursivecallbackfilteriterator.html">RecursiveCallbackFilterIterator</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="recursivecallbackfilteriterator.construct" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">RecursiveCallbackFilterIterator::__construct</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.4.0)</p><p class="refpurpose"><span class="refname">RecursiveCallbackFilterIterator::__construct</span> &mdash; <span class="dc-title">Create a RecursiveCallbackFilterIterator from a RecursiveIterator</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-recursivecallbackfilteriterator.construct-description">
  <h3 class="title">说明</h3>
  <div class="constructorsynopsis dc-description">
   <span class="modifier">public</span>
   <span class="methodname"><strong>RecursiveCallbackFilterIterator::__construct()</strong></span>
    ( <span class="methodparam"><span class="type"><a href="class.recursiveiterator.html" class="type RecursiveIterator">RecursiveIterator</a></span> <code class="parameter">$iterator</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$callback</code></span>
   )</div>

  <p class="para rdfs-comment">
   Creates a filtered iterator from a <span class="interfacename"><a href="class.recursiveiterator.html" class="interfacename">RecursiveIterator</a></span>
   using the <em><code class="parameter">callback</code></em> to determine which 
   items are accepted or rejected.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-recursivecallbackfilteriterator.construct-parameters">
  <h3 class="title">参数</h3>
  <dl>

   
    <dt>
<em><code class="parameter">iterator</code></em></dt>

    <dd>

     <p class="para">
      The recursive iterator to be filtered.
     </p>
    </dd>

   
   
    <dt>
<em><code class="parameter">callback</code></em></dt>

    <dd>

     <p class="para">
      The callback, which should return <strong><code>TRUE</code></strong> to accept the current item
      or <strong><code>FALSE</code></strong> otherwise.
      See <a href="class.recursivecallbackfilteriterator.html#recursivecallbackfilteriterator.examples" class="link">Examples</a>.
     </p>
     <p class="para">
      May be any valid <span class="type"><a href="language.types.callable.html" class="type callable">callable</a></span> value.
     </p>
    </dd>

   
  </dl>

 </div>


 <div class="refsect1 returnvalues" id="refsect1-recursivecallbackfilteriterator.construct-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   没有返回值。
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-recursivecallbackfilteriterator.construct-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><a href="class.recursivecallbackfilteriterator.html#recursivecallbackfilteriterator.examples" class="link">RecursiveCallbackFilterIterator Examples</a></li>
    <li class="member"><span class="methodname"><a href="recursivecallbackfilteriterator.getchildren.html" class="methodname" rel="rdfs-seeAlso">RecursiveCallbackFilterIterator::getChildren()</a> - Return the inner iterator's children contained in a RecursiveCallbackFilterIterator</span></li>
    <li class="member"><span class="methodname"><a href="recursivecallbackfilteriterator.haschildren.html" class="methodname" rel="rdfs-seeAlso">RecursiveCallbackFilteriterator::hasChildren()</a> - Check whether the inner iterator's current element has children</span></li>
   </ul>
  </p>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="class.recursivecallbackfilteriterator.html">RecursiveCallbackFilterIterator</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="recursivecallbackfilteriterator.getchildren.html">RecursiveCallbackFilterIterator::getChildren</a></div>
 <div class="up"><a href="class.recursivecallbackfilteriterator.html">RecursiveCallbackFilterIterator</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
